<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta charset="utf-8" />
<title>代码生成机</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<script type="text/javascript">
	var webPath = '{$__WEBPATH__}';
</script>
<script src="{$__WEBPATH__}/static/common/js/roubSite.js"></script>
<script type="text/javascript">
	RS.webPath = '{$__WEBPATH__}';
</script>
<script src="{$__WEBPATH__}/static/common/js/import.js"></script>

</head>

<body>
	<div class="layui-fluid">
		<div class="layui-card">
			<div class="layui-card-header">代码生成</div>
			<div class='layui-card-body'>
				<div class="layui-row layui-col-space15">
					<div class="layui-col-md12">
						<form id="editForm" class="layui-form" onsubmit="return false;">
							<div class="layui-form-item">
								<div class="layui-inline">
									<span class="layui-form-label">模块名</span>
									<div class="layui-input-inline">
										<select id="form-field-1" class="col-xs-10 col-sm-5" name="mode">
											${foreach from=$groupList key=k item=value}
											<option value='{$value}'>{$value}</option>
											${/foreach}
										</select>
									</div>
									<div class="layui-form-mid layui-word-aux">config.properties中“global.group.”后面的为模块名</div>
								</div>

							</div>
							<div class="layui-form-item">
								<div class="layui-inline">
									<span class="layui-form-label">数据源：</span>
									<div class="layui-input-inline">
										<select id="dataSource" name="dataSource" lay-filter='dataSource'>
											${foreach from=$dataSourceList key=k item=value}
											<option value='{$value}'>{$value}</option>
											${/foreach}
										</select>
									</div>
								</div>
							</div>
							<div class="layui-form-item">
								<div class="layui-inline">
									<span class="layui-form-label">表名：</span>
									<div class="layui-input-inline">
										<select id="tableName" lay-filter='tableName' name="tableName"> 
										</select>
									</div>
								</div>
							</div>
							<div class="layui-form-item">
								<div class="layui-inline">
									<span class="layui-form-label">用作搜索的字段：</span>
									<div class="layui-input-inline">
										<div id='allFields'></div>
									</div>
								</div>
							</div>
							<div class="layui-form-item">
								<div class="layui-form-item">
									<div class="layui-input-block">
										<button type="submit" class="layui-btn" lay-submit lay-filter='submit-btn'>提交</button>
									</div>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript" src="{$__WEBPATH__}/static/codeSign/codeSign.js"></script>
	<script type="text/javascript">
		function makeFile() {
			$.ajax({
					type : "POST",
					url : '{$__WEBPATH__}/codeSign/code/codeSubmitForm',
					data : $('#editForm').serialize(),
					error : function(request) {
						alert("连接服务器失败");
					},
					success : function(data) {
						alert('代码生成成功');
					}
			});
		}
	</script>
</body>
</html>
